/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 19182
 * Date: 2025-10-18
 * Time: 10:00
 */
public class test {
    public static void main1(String[] args) {
        int[] arr = new int[]{1,3,2,13,10,3,14,18, 130};
        MybitSet mybitSet = new MybitSet(18);
        //排序
        for(int i = 0; i < arr.length; i++){
            mybitSet.set(arr[i]);
        }
        for(int i = 0; i < mybitSet.elem.length; i++){
            for(int j = 0; j < 8; j++){
                //如果bitIndex是1，那么这个数字存在
                if((mybitSet.elem[i] & (1 << j)) != 0){
                    System.out.println(i * 8 + j);
                }
            }
        }
    }

    public static void main(String[] args) {
        int[] array = {1,2,3,10,4,18,130};
        MybitSet myBitSet = new MybitSet(18);
        for (int i = 0; i <array.length; i++) {
            myBitSet.set(array[i]);
        }
        System.out.println(myBitSet.getUsedSize());
        boolean ret = myBitSet.get(120);
        System.out.println(ret);
        boolean b = myBitSet.get(130);
        System.out.println(b);
        myBitSet.reSet(130);
        boolean b1 = myBitSet.get(130);
        System.out.println(b1);


    }
}
